# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Maintainer: Ray Donnelly <mingw.android@gmail.com>
# Maintainer: Naveen M K <naveen521kk@gmail.com>
# Contributor: Saul Ibarra Corretge <saghul@gmail.com>
# Contributor: Frode Solheim <frode@fs-uae.net>

_primary_python="yes"
_pybasever=3.12
_realname=python

if [[ "${_primary_python}" == "yes" ]]; then
  pkgbase="mingw-w64-${_realname}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
  provides=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
  conflicts=("${MINGW_PACKAGE_PREFIX}-python3"
             "${MINGW_PACKAGE_PREFIX}-python${_pybasever}"
            "${MINGW_PACKAGE_PREFIX}-python2<2.7.16-7")
  replaces=("${MINGW_PACKAGE_PREFIX}-python3"
            "${MINGW_PACKAGE_PREFIX}-python${_pybasever}")
else
  pkgbase="mingw-w64-${_realname}${_pybasever}"
  pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}${_pybasever}")
fi
pkgver=${_pybasever}.10
pkgrel=1
pkgdesc="A high-level scripting language (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
license=('spdx:PSF-2.0')
url="https://www.python.org/"
msys2_references=(
  "cpe: cpe:/a:python:python"
  "cpe: cpe:/a:python_software_foundation:python"
)
depends=("${MINGW_PACKAGE_PREFIX}-gcc-libs"
         "${MINGW_PACKAGE_PREFIX}-expat"
         "${MINGW_PACKAGE_PREFIX}-bzip2"
         "${MINGW_PACKAGE_PREFIX}-libffi"
         "${MINGW_PACKAGE_PREFIX}-mpdecimal"
         "${MINGW_PACKAGE_PREFIX}-ncurses"
         "${MINGW_PACKAGE_PREFIX}-openssl"
         "${MINGW_PACKAGE_PREFIX}-sqlite3"
         "${MINGW_PACKAGE_PREFIX}-tcl"
         "${MINGW_PACKAGE_PREFIX}-tk"
         "${MINGW_PACKAGE_PREFIX}-zlib"
         "${MINGW_PACKAGE_PREFIX}-xz"
         "${MINGW_PACKAGE_PREFIX}-tzdata")
makedepends=(
  "${MINGW_PACKAGE_PREFIX}-cc"
  "${MINGW_PACKAGE_PREFIX}-autotools"
  "autoconf-archive"
)
#options=('debug' '!strip')
source=("https://www.python.org/ftp/python/${pkgver%rc?}/Python-${pkgver}.tar.xz"
        "EXTERNALLY-MANAGED"
        https://github.com/python/cpython/commit/29648980d440e70ade4e0975b8d6aa83214866ed.patch
        0001-sysconfig-make-_sysconfigdata.py-relocatable.patch
        0002-build-add-with-nt-threads-and-make-it-default-on-min.patch
        0003-Define-MS_WINDOWS-and-others-when-compiling-with-MIN.patch
        0004-configure-add-MACHDEP-and-platform-on-MINGW.patch
        0005-Add-default-configuration-for-MINGW.patch
        0006-configure-enable-largefile-support-by-default-for-Mi.patch
        0007-Add-PC-to-CPPFLAGS-and-to-SRCDIRS-on-Mingw.patch
        0008-posixmodule.c-Define-necessary-headers-for-compiling.patch
        0009-Build-winreg-by-default-when-compiling-for-MINGW.patch
        0010-pyport.h-Add-support-for-MINGW.patch
        0011-configure-add-options-so-that-shared-build-is-possib.patch
        0012-Add-dynamic-loading-support-for-MINGW.patch
        0013-Ignore-main-program-for-frozen-scripts-on-MINGW.patch
        0014-Detect-winsock2-and-setup-_socket-module-on-MINGW.patch
        0015-Enable-some-windows-specific-modules.patch
        0016-sysconfig-MINGW-build-extensions-with-GCC.patch
        0017-sysconfig-treat-MINGW-builds-as-POSIX-builds.patch
        0018-Add-support-for-stdcall-without-underscore.patch
        0019-Customize-site-for-MINGW.patch
        0020-add-python-config-sh.patch
        0021-mingw-prefer-unix-sep-if-MSYSTEM-environment-variabl.patch
        0022-msys-cygwin-semi-native-build-sysconfig.patch
        0023-sysconfig-mingw-sysconfig-like-posix.patch
        0024-mingw-use-backslashes-in-compileall-py.patch
        0025-mingw-pdcurses_ISPAD.patch
        0026-remove_path_max.default.patch
        0027-dont-link-with-gettext.patch
        0028-ctypes-python-dll.patch
        0029-gdbm-module-includes.patch
        0030-use-gnu_printf-in-format.patch
        0031-mingw-fix-ssl-dont-use-enum_certificates.patch
        0032-fix-using-dllhandle-and-winver-mingw.patch
        0033-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch
        0034-MINGW-link-with-additional-library.patch
        0035-install-msilib.patch
        0036-fix-signal-module-build.patch
        0037-build-build-winconsoleio-and-_testconsole.patch
        0038-expose-sem_unlink.patch
        0039-Use-cygpty-while-using-isatty.patch
        0040-build-link-win-resource-files-and-build-pythonw.patch
        0041-fix-isselectable.patch
        0042-configure.ac-fix-inet_pton-check.patch
        0043-pass-gen-profile-ldflags.patch
        0044-pkg-config-windows-must-link-ext-with-python-lib.patch
        0045-importlib-bootstrap-path-sep.patch
        0046-warnings-fixes.patch
        0047-fix-build-testinternalcapi.patch
        0048-clang-arm64.patch
        0049-configure.ac-set-MINGW-stack-reserve.patch
        0050-Don-t-use-os.pathsep-to-find-EOF.patch
        0051-Fix-extension-suffix-for-c-extensions-on-mingw.patch
        0052-Change-the-get_platform-method-in-sysconfig.patch
        0053-build-Fix-ncursesw-include-lookup.patch
        0054-tests-fix-test_bytes.patch
        0055-time-fix-strftime-not-raising-for-invalid-year-value.patch
        0056-ctypes-find_library-c-should-return-None-with-ucrt.patch
        0057-build-Disable-checks-for-dlopen-dlfcn.patch
        0058-Fix-install-location-of-the-import-library.patch
        0059-build-Integrate-venvlauncher-build-installation-into.patch
        0060-configure.ac-set-_WIN32_WINNT-version.patch
        0061-configure.ac-don-t-check-for-clock_-functions.patch
        0062-expanduser-normpath-paths-coming-from-env-vars.patch
        0063-CI-test-the-build-and-add-some-mingw-specific-tests.patch
        0064-Define-PY3_DLLNAME-to-fix-build.patch
        0065-_testconsole.c-Fix-casing-path-sep.patch
        0066-Return-consistent-architecture-markers-for-python-on.patch
        0067-handle-ncursesw-pkg-config-when-cross-compiling.patch
        0068-mingw_smoketests-fix-_UCRT-condition.patch
        0069-Modify-sys.winver-to-match-upstream.patch
        0070-Change-user-site-packages-path-to-include-the-enviro.patch
        0071-configure-Include-a-header-in-the-check-for-_beginth.patch
        0072-configure.ac-Default-to-without-c-locale-coercion-on.patch
        0073-Fix-failing-tests.patch
        0074-Don-t-change-os.sep-with-an-empty-MSYSTEM-env-var-no.patch
        0075-def-VPATH-when-compiling-Python-sysmodule.c.patch
        0076-Make-_Py_CheckPython3-extern.patch
        0077-link-with-bcrypt.patch
        0078-correctly-find-native-python.patch
        0079-Add-extra-flags-for-_bootstrap_python.patch
        0080-posixmodule-undefine-HAVE_OPENDIR.patch
        0081-getpath.py-add-support-for-mingw.patch
        0082-Don-t-build-_posixsubprocess-on-Windows.patch
        0083-_ssl-link-with-ws2_32.patch
        0084-Always-normalize-path-in-abspath.patch
        0085-Include-winsock.h-when-checking-for-netdb-function.patch
        0086-include-_multiprocessing-semaphore.c-on-win32.patch
        0087-configure-build-mmap-module-on-win32.patch
        0088-venv-creation-fixes.patch
        0089-move-the-shutdown-function-where-winsock.h-is-includ.patch
        0090-configure.ac-set-BUILDEXEEXT-and-EXEEXT.patch
        0091-configure.ac-fix-building-some-test-modules.patch
        0092-Don-t-convert-sysconfig.get_config_var-VPATH-to-an-a.patch
        0093-Always-convert-to-before-passing-though-pathcch-func.patch
        0094-Build-venvlauncher.exe-from-PC-launcher.c.patch
        0095-getpath.py-fix-dirname.patch
        0096-getpath-use-normpath-on-all-generated-paths.patch
        0097-pathconfig-normpath-sys.path-0.patch
        0098-smoketests-add-some-tests-for-sys-site-paths.patch
        0099-Search-DLLs-only-on-paths-added-using-add_dll_direct.patch
        0100-Build-and-install-libpython3.dll.patch
        0101-Port-GetPythonImport-to-mingw.patch
        0102-LoadLibraryExW-make-sure-to-only-use-backslashes-for.patch
        0103-mingw_smoketests-add-a-test-to-check-if-sysconfig-re.patch
        0104-Add-missing-library-for-multiprocessing-module.patch
        0105-selectmodule-add-support-for-MINGW.patch
        0106-readline-disable-on-MINGW.patch
        0107-Add-libraries-to-fix-compile-of-ctypes-on-MINGW.patch
        0108-Add-lpython-version-while-linking-stdlib.patch
        0109-Enable-_uuid-on-MINGW.patch
        0110-Enable-curses-library-on-MINGW.patch
        0111-mingw_smoketests-disable-distutils-related-tests.patch
        0112-configure.ac-use-autoconf-2.69.patch
        0113-CI-clean-up-ignored-tests.patch
        0114-gcc-make-incompatible-pointer-types-as-warning.patch
        0115-test_makefile-normalize-path.patch
        0116-sysconfig.get_platform-use-consistent-naming.patch
        0117-Add-ucrt-to-version-string.patch
        0118-socketmodule-fix-captilization-of-headers.patch
        0119-mingw_smoketests-build-extension-in-a-venv.patch
        0120-venvlauncher-try-looking-for-the-versioned-.exe-firs.patch
        0121-CI-update-actions.patch
        0122-CI-test-CLANGARM64.patch)

# Helper macros to help make tasks easier #
apply_patch_with_msg() {
  for _patch in "$@"
  do
    msg2 "Applying ${_patch}"
    patch -Nbp1 -i "${srcdir}/${_patch}"
  done
}

prepare() {
  cd "${srcdir}/Python-${pkgver}"

 apply_patch_with_msg 0001-sysconfig-make-_sysconfigdata.py-relocatable.patch \
  0002-build-add-with-nt-threads-and-make-it-default-on-min.patch \
  0003-Define-MS_WINDOWS-and-others-when-compiling-with-MIN.patch \
  0004-configure-add-MACHDEP-and-platform-on-MINGW.patch \
  0005-Add-default-configuration-for-MINGW.patch \
  0006-configure-enable-largefile-support-by-default-for-Mi.patch \
  0007-Add-PC-to-CPPFLAGS-and-to-SRCDIRS-on-Mingw.patch \
  0008-posixmodule.c-Define-necessary-headers-for-compiling.patch \
  0009-Build-winreg-by-default-when-compiling-for-MINGW.patch \
  0010-pyport.h-Add-support-for-MINGW.patch \
  0011-configure-add-options-so-that-shared-build-is-possib.patch \
  0012-Add-dynamic-loading-support-for-MINGW.patch \
  0013-Ignore-main-program-for-frozen-scripts-on-MINGW.patch \
  0014-Detect-winsock2-and-setup-_socket-module-on-MINGW.patch \
  0015-Enable-some-windows-specific-modules.patch \
  0016-sysconfig-MINGW-build-extensions-with-GCC.patch \
  0017-sysconfig-treat-MINGW-builds-as-POSIX-builds.patch \
  0018-Add-support-for-stdcall-without-underscore.patch \
  0019-Customize-site-for-MINGW.patch \
  0020-add-python-config-sh.patch \
  0021-mingw-prefer-unix-sep-if-MSYSTEM-environment-variabl.patch \
  0022-msys-cygwin-semi-native-build-sysconfig.patch \
  0023-sysconfig-mingw-sysconfig-like-posix.patch \
  0024-mingw-use-backslashes-in-compileall-py.patch \
  0025-mingw-pdcurses_ISPAD.patch \
  0026-remove_path_max.default.patch \
  0027-dont-link-with-gettext.patch \
  0028-ctypes-python-dll.patch \
  0029-gdbm-module-includes.patch \
  0030-use-gnu_printf-in-format.patch \
  0031-mingw-fix-ssl-dont-use-enum_certificates.patch \
  0032-fix-using-dllhandle-and-winver-mingw.patch \
  0033-Add-AMD64-to-sys-config-so-msvccompiler-get_build_ve.patch \
  0034-MINGW-link-with-additional-library.patch \
  0035-install-msilib.patch \
  0036-fix-signal-module-build.patch \
  0037-build-build-winconsoleio-and-_testconsole.patch \
  0038-expose-sem_unlink.patch \
  0039-Use-cygpty-while-using-isatty.patch \
  0040-build-link-win-resource-files-and-build-pythonw.patch \
  0041-fix-isselectable.patch \
  0042-configure.ac-fix-inet_pton-check.patch \
  0043-pass-gen-profile-ldflags.patch \
  0044-pkg-config-windows-must-link-ext-with-python-lib.patch \
  0045-importlib-bootstrap-path-sep.patch \
  0046-warnings-fixes.patch \
  0047-fix-build-testinternalcapi.patch \
  0048-clang-arm64.patch \
  0049-configure.ac-set-MINGW-stack-reserve.patch \
  0050-Don-t-use-os.pathsep-to-find-EOF.patch \
  0051-Fix-extension-suffix-for-c-extensions-on-mingw.patch \
  0052-Change-the-get_platform-method-in-sysconfig.patch \
  0053-build-Fix-ncursesw-include-lookup.patch \
  0054-tests-fix-test_bytes.patch \
  0055-time-fix-strftime-not-raising-for-invalid-year-value.patch \
  0056-ctypes-find_library-c-should-return-None-with-ucrt.patch \
  0057-build-Disable-checks-for-dlopen-dlfcn.patch \
  0058-Fix-install-location-of-the-import-library.patch \
  0059-build-Integrate-venvlauncher-build-installation-into.patch \
  0060-configure.ac-set-_WIN32_WINNT-version.patch \
  0061-configure.ac-don-t-check-for-clock_-functions.patch \
  0062-expanduser-normpath-paths-coming-from-env-vars.patch \
  0063-CI-test-the-build-and-add-some-mingw-specific-tests.patch \
  0064-Define-PY3_DLLNAME-to-fix-build.patch \
  0065-_testconsole.c-Fix-casing-path-sep.patch \
  0066-Return-consistent-architecture-markers-for-python-on.patch \
  0067-handle-ncursesw-pkg-config-when-cross-compiling.patch \
  0068-mingw_smoketests-fix-_UCRT-condition.patch \
  0069-Modify-sys.winver-to-match-upstream.patch \
  0070-Change-user-site-packages-path-to-include-the-enviro.patch \
  0071-configure-Include-a-header-in-the-check-for-_beginth.patch \
  0072-configure.ac-Default-to-without-c-locale-coercion-on.patch \
  0073-Fix-failing-tests.patch \
  0074-Don-t-change-os.sep-with-an-empty-MSYSTEM-env-var-no.patch \
  0075-def-VPATH-when-compiling-Python-sysmodule.c.patch \
  0076-Make-_Py_CheckPython3-extern.patch \
  0077-link-with-bcrypt.patch \
  0078-correctly-find-native-python.patch \
  0079-Add-extra-flags-for-_bootstrap_python.patch \
  0080-posixmodule-undefine-HAVE_OPENDIR.patch \
  0081-getpath.py-add-support-for-mingw.patch \
  0082-Don-t-build-_posixsubprocess-on-Windows.patch \
  0083-_ssl-link-with-ws2_32.patch \
  0084-Always-normalize-path-in-abspath.patch \
  0085-Include-winsock.h-when-checking-for-netdb-function.patch \
  0086-include-_multiprocessing-semaphore.c-on-win32.patch \
  0087-configure-build-mmap-module-on-win32.patch \
  0088-venv-creation-fixes.patch \
  0089-move-the-shutdown-function-where-winsock.h-is-includ.patch \
  0090-configure.ac-set-BUILDEXEEXT-and-EXEEXT.patch \
  0091-configure.ac-fix-building-some-test-modules.patch \
  0092-Don-t-convert-sysconfig.get_config_var-VPATH-to-an-a.patch \
  0093-Always-convert-to-before-passing-though-pathcch-func.patch \
  0094-Build-venvlauncher.exe-from-PC-launcher.c.patch \
  0095-getpath.py-fix-dirname.patch \
  0096-getpath-use-normpath-on-all-generated-paths.patch \
  0097-pathconfig-normpath-sys.path-0.patch \
  0098-smoketests-add-some-tests-for-sys-site-paths.patch \
  0099-Search-DLLs-only-on-paths-added-using-add_dll_direct.patch \
  0100-Build-and-install-libpython3.dll.patch \
  0101-Port-GetPythonImport-to-mingw.patch \
  0102-LoadLibraryExW-make-sure-to-only-use-backslashes-for.patch \
  0103-mingw_smoketests-add-a-test-to-check-if-sysconfig-re.patch \
  0104-Add-missing-library-for-multiprocessing-module.patch \
  0105-selectmodule-add-support-for-MINGW.patch \
  0106-readline-disable-on-MINGW.patch \
  0107-Add-libraries-to-fix-compile-of-ctypes-on-MINGW.patch \
  0108-Add-lpython-version-while-linking-stdlib.patch \
  0109-Enable-_uuid-on-MINGW.patch \
  0110-Enable-curses-library-on-MINGW.patch \
  0111-mingw_smoketests-disable-distutils-related-tests.patch \
  0112-configure.ac-use-autoconf-2.69.patch \
  0113-CI-clean-up-ignored-tests.patch \
  0114-gcc-make-incompatible-pointer-types-as-warning.patch \
  0115-test_makefile-normalize-path.patch \
  0116-sysconfig.get_platform-use-consistent-naming.patch \
  0117-Add-ucrt-to-version-string.patch \
  0118-socketmodule-fix-captilization-of-headers.patch \
  0119-mingw_smoketests-build-extension-in-a-venv.patch \
  0120-venvlauncher-try-looking-for-the-versioned-.exe-firs.patch \
  0121-CI-update-actions.patch \
  0122-CI-test-CLANGARM64.patch
 
  autoreconf -vfi
}

build() {
  declare -a _extra_config
  if check_option "debug" "n"; then
    _extra_config+=("--enable-optimizations")
    # Upstream defaults to -O3, so we can do too
    CFLAGS+=" -O3"
    # FIXME: https://github.com/msys2-contrib/cpython-mingw/issues/10
    if [[ $MINGW_PACKAGE_PREFIX == *-clang-* ]]; then
      _extra_config+=("--with-lto=full")
    fi
  else
    CFLAGS+=" -O0 -ggdb"
    CXXFLAGS+=" -O0 -ggdb"
    _extra_config+=("--with-pydebug")
  fi

  case "${CARCH}" in
    i686)
      LDFLAGS+=" -Wl,--large-address-aware"
    ;;
  esac

  mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"

  ../Python-${pkgver}/configure \
    --prefix=${MINGW_PREFIX} \
    --host=${MINGW_CHOST} \
    --build=${MINGW_CHOST} \
    --enable-shared \
    --with-system-expat \
    --with-system-ffi \
    --with-system-libmpdec \
    --without-ensurepip \
    --enable-loadable-sqlite-extensions \
    --with-tzpath=${MINGW_PREFIX}/share/zoneinfo \
    "${_extra_config[@]}"

  make
}

check() {
  cd "${srcdir}/build-${MSYSTEM}"

  # Some basic tests to ensure nothing major or MSYS2 specific features are broken
  ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
  MSYSTEM= ./python.exe "../Python-${pkgver}/mingw_smoketests.py"
}

package() {
  cd "${srcdir}/build-${MSYSTEM}"

  make -j1 install DESTDIR="${pkgdir}"

  # gdb pretty printers for debugging Python itself; to use:
  # python
  # sys.path.append('C:/msys64/mingw64/share/gdb/python3')
  # import python_gdb
  # reload(python_gdb)
  # end
  if [[ "${_primary_python}" == "yes" ]]; then
    [[ -d "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/ ]] || mkdir -p "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/
    cp -f python.exe-gdb.py "${pkgdir}${MINGW_PREFIX}"/share/gdb/python3/python_gdb.py
  fi

  # some useful "stuff"
  install -dm755 "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/{i18n,scripts}
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/i18n/{msgfmt,pygettext}.py "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/i18n/
  install -m755 "${srcdir}/Python-${pkgver}"/Tools/scripts/{README,*py} "${pkgdir}${MINGW_PREFIX}"/lib/python${_pybasever}/Tools/scripts/

  # License
  install -Dm644 "${srcdir}/Python-${pkgver}/LICENSE" "${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}${_pybasever}/LICENSE"

  # PEP668
  install -Dm644 "${srcdir}/EXTERNALLY-MANAGED" -t "${pkgdir}${MINGW_PREFIX}/lib/python${_pybasever}/"

  # fixup shebangs
  for fscripts in 2to3 2to3-${_pybasever} idle3 idle${_pybasever} pydoc3 pydoc${_pybasever}; do
    sed -e '1 { s|^#!.*$|#!/usr/bin/env python'"${_pybasever}"'.exe| }' -i "${pkgdir}${MINGW_PREFIX}"/bin/${fscripts}
  done

  # default aliases for all scripts/binaries
  if [[ "${_primary_python}" == "yes" ]]; then
    # Default names are aliases for Python now
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe "${pkgdir}${MINGW_PREFIX}"/bin/python.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe "${pkgdir}${MINGW_PREFIX}"/bin/pythonw.exe
    cp "${pkgdir}${MINGW_PREFIX}"/bin/python3-config "${pkgdir}${MINGW_PREFIX}"/bin/python-config
    cp "${pkgdir}${MINGW_PREFIX}"/bin/idle3 "${pkgdir}${MINGW_PREFIX}"/bin/idle
    cp "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3 "${pkgdir}${MINGW_PREFIX}"/bin/pydoc
  fi

  # delete anything that could conflict with the primary Python
  if [[ "${_primary_python}" != "yes" ]]; then
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3w.exe
    rm "${pkgdir}${MINGW_PREFIX}"/bin/python3-config
    rm "${pkgdir}${MINGW_PREFIX}"/bin/idle3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/pydoc3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/2to3
    rm "${pkgdir}${MINGW_PREFIX}"/bin/libpython3.dll
    rm "${pkgdir}${MINGW_PREFIX}"/lib/libpython3.dll.a
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3-embed.pc
    rm "${pkgdir}${MINGW_PREFIX}"/lib/pkgconfig/python3.pc
    rm "${pkgdir}${MINGW_PREFIX}"/share/man/man1/python3.1
  fi
}

sha256sums=('07ab697474595e06f06647417d3c7fa97ded07afc1a7e4454c5639919b46eaea'
            '3981fed74ee7d43ad69bd67e634e03d7bf6890558a87062380112e195688728a'
            'b5c9ad802d6f3614aefbaec593c1c670dd1918b56e4ac9a682a6f23dfba579fa'
            'ea3bbc4dfca48681c4de97fa1ccb6345e4d34978528cee591630507a3cf74e5e'
            'db026e2823d1cb50061ea2b527fddbde8e04c49db58b2028138eb9c55932dd8f'
            'b007ed1a5abf5f3bd6edd9f455e003c40274882a8f9290e3f589900e71221d85'
            'b4f0e0a6ad05aa02a8c8d87a48c38e93def8ddbad58bf45a35e0912def95ff2c'
            'fa5f81697ffb07a90986adc689fddb98c07529c65585dda8b9c14e9ab342ec86'
            'dab7932205f961d4e4b68fc7f9c094f73df2dcd652bdb7ec81f7cbc1c2daf2cf'
            '29047226dccc00efa7d1ab01035c500a2efad94901762ecb3f63279063342235'
            '4e57dcb5966b8058565aec2b6a9ba9f9486e86c8436b874bb8779ec9ed39e85b'
            'af483e2c68af6419de8f26134e74e60c51d4445feca93921afe16277bc7d2b29'
            '43876db1c3b8b8b9bcf42dbcf31eb373e3c5ae062f6b5947907d62a7ef43dc96'
            '49faf6b8c57cdcaaa74982e53f6980cf1d586a592a9f33f82e1c0a27cc55c15f'
            'dcd6618498b1682080ab926cae61afacd81fea45332a715457710f72cb4fb623'
            '8f51c6f8fb2fee016bbec98b31a7e8ac3deb1994e45877380421c9e7ba987380'
            'eb7c01339fce7895b168626698f94914267fcf9f6c06aba93b65a1b491b6abc1'
            '8b7c9a639387e4f197cfdc64bceb4af5c5f6194a34cd061ba8e3cfc92f668542'
            '41f84e64fef48eb31e063aa8fb353abe4f778fc1d2cbb8e4f5e465239791cda8'
            'ae2859aafd4e5a7c33971946a7c1b437abf277264fddd577f0638d9ae887e96d'
            'e8a9de650c0ca82bcb7c81d3ac5421187f2a05909dd75d478cf9bbaa0debe6f1'
            '1fd62afdfd391939c80dc3c72828c5fda4154dbea7541135e98d9413c1176867'
            'd43f71534386ed7528e10fd3f94376c061e77bfe112d41d807dd4eac57f132ab'
            '3325f0fde8c5d01d75406e7812fedd1f711f6a37a9b97c258f769566e75cc264'
            'ab7fc61b7dcc1ab779cace5b4d2b548a00c6a66cd63ed3812fbfaa8bfac0a02d'
            '4c201468b90a3b558cdbe0463f891329bf0ad626635b77b700e9a6170f2588dc'
            '0e1e3169cba74b85fe29d7f016933bb22ba214eb278d93c108b6586e7fd57346'
            'd124d22e4d1dc23e3bc22019cd4f8edc9d87c5d41cdfb5ee39b475affcf6f0e6'
            'cb62f81932cab7f897a8456aeda450a00b32659eb25a93f09f142bffbc9e4fb3'
            '70b510181dbf604d8a8dec283eedf19d1bc9081cb7eb16a91d9b76dfa3c726ca'
            '27738d375c52b6973efa788f2bb0955e96231b434ad7c26e58e796e808462c99'
            '16314a8d78af6484d5553972b48c2c58c641a55e801e1395d09894043066ef01'
            '04b8bfb50e9c04975ebad4e70c62e388d8f7595f6b7bc66a87dd7690da18868d'
            '8f86f5f2c5c590e46db934118e93f69fb77fc61ed1805cdc9bc342fb66eeacaa'
            '7fb82ca96f65fc252cf02a3ba2f3aef7d2a6f9bc6af3b20823da340d0996694d'
            '8ad50d6812c6e5f7205c3a573bdf5cce91820aa6b9380d26fd165bd7940653a3'
            '864c33cc23159599cd777af5ecae95d03bb1551d6fc1c0fefa55bae523a31f4e'
            '7bd0d2fedd3a737265aceb956fa34dcbf78696717baec7b62e214db22869c6ba'
            '7ea65af2d94c9fd221f3f6f47132a035d53358de8054f94cf90ace5e572d5d63'
            '0752e6052d8b5d507de9d9975bbbcacecc8ca87a0e016ae3e56be5403467b40c'
            '79fb4025dc9f6a83895c40cb6893099477d55b7d81067bd4f97f2efab25bfdc7'
            '73fdc696ba15c0f0e59d934feb0eda55847e3eb66c96c2544112bd1332b6f24b'
            'bea2f01dc86b31c46496bd41b2ab6b00abd5e38d6f342c808c3ebe4fbfed0272'
            'cc8052b9b33ecbc1679fca44d584b8c3ee01815dad6d20f9c45116547ab1afbe'
            '41a2c4b657ea78a269a6848f5125344319b5bc16e12e3b8a4cb3966df1905f55'
            'acef94176502771fafaa95472072e124a07bb90b75a0d4c11131cde6e263a445'
            'eb78819fdb5f1668467ca7625cceabeff8074ee8fcd3d58a78f03072525d3032'
            'bae8f7e4fc2c4a71828f9222eb6f93956d255c615faab74416cf3c3c388fdcef'
            'aef8504189a8ede876ed18509baa08d2c49d762ab575eb588149979e0103dc20'
            '58fdc8cac7259635fcdf4fe5a9a621611a3e04529519a784ae43baf986e9ae25'
            '2918ec9124efabbcc32b4b43a9e62490167da5583f970b755e423b22e63ed99d'
            'e8f3067c913502fdb8f7a885bf99bfcf7b7c25366fc908292c8fc88e2165b70b'
            '7268b1cda3bf5462d291995471002ff0affde3cfb606c7882e742b2851786283'
            '6e300ec4b1f90a0fa623775abc3bd5c96d135fd72381780263038cc68f972450'
            'f25278a76749fc72a8a89bc7e09e4d9b6d88d9c05cade99aaf6156bbd993785f'
            '40437c9261742641e30cea4e64908e455aab660d8f634d11d089f711ed4a041d'
            '2523ff18f48d5f5e1abee53e5c29a34b6777a37f9c128d8ddfa0c044bc47d877'
            'f89909c6b7a81d557c09d4f6b5cb45317720b266bb1c0a7d350aa732ff30c828'
            'b8c2cda9cbe99630ae5ec0aa0265f6d7efd4852cfc5766bf811df9a7dd4f5086'
            '5724e522c23b7b5968f43f90ad8da3773d17995522fa9289c7e6bf1385c0cc03'
            '034a89f857a22af4f0da1d83aeb60d053eedadc87f71029b69649184f1a193fe'
            '8f190436f9113ff31226fe4b1ca25f44332d45715de2556d17f035f30353e0ae'
            '78c86d0c03a4b8eaf7e02af957948f97a17054bfe949a0e41fabc0a0339a423e'
            '43a8e986c98342b56fc17d7a7317dc5563e3b790bdbcb7be00caab839dce4405'
            'f7f1027be84af34fe4c70ce4a4a74e55ccd7b426a9b6bed9784f1ab8abfa05bc'
            'db800a0fc71763197296b7365e8a03c9d2c03935fe7961ea066d4613dec0a62f'
            'f28be35f68073c2d8453cebcfbf8545dfadfb646e508d0fdaf0d20d5b547ff17'
            '494d275d20ae4ba8c7465d1334ff8ca39c3bbfdae1c2e448ac6932e2c3ce8072'
            '845e1b1594239617c69b589b573a440309b71e0e8d6771521b64f1d81ee6f868'
            '9fed962f3d28fdb70f97e83094ae7d089c00bccb8eec48651caa9f76099a2060'
            'ae3247823a24ec9428c53ab460ff90f13882b9c93d74ed7729ce1842d7aaab8b'
            '69b92ca58cea92b96f95373eaf3668a4b250915195594db755fd56d43691d1f2'
            '52230ad720f672fbe50b9532c507d758911b2c2a072363104c3e315ed94a4094'
            'd4000b739c781309ed9bf5a247a3592bfc4c5b5c09e9ff8ca60a26856a5d6800'
            'b0f23428ddbf949c686fd67051c021708305ac34dcb7bcd366991b84cdc418bd'
            '905ea38a3a44a89e82fd4adc0cec3f970d01c519938800b65ba41975cfb2f9a3'
            'adb2a973d582ec671f8cd5a63dffb8b8ceb5019f8b69f192d6b1c446a87ea721'
            '5f31d8889a30fb81f4fe5521fa7d8f46b5e490d1ec9853158662bdd42e192468'
            'ab83eb62c340c77f5cd78dcee8a9766fdad8be814d860dbd1809142f040d1116'
            '143849b66d7c5bd52a890df2e95d2c3a2b844fdbd951482279df6ae72376d725'
            '19c4cab85f3b221e3ea0f50daa00d387ea58b3f43583bc044329305f603ecef7'
            '3fec379183f9412045c2b88fd07ad45d447b03d68faf97e729e021f4c624e1e6'
            '6f10c107980499508ecd4bd43586a52ecbf17db3ce077383b7537cbb3a9d500d'
            '0437498ef545f4edd66e37bbe1f5a206956fcee88c76619cdfb68bbfc9e7bd1e'
            '10a7e0a903cd078dd3a7c50d4fc76feffd49c4e201736bead01c605a327fc787'
            'eb532d8110dcab6c018ee9ad7776ec5bb5ced677ac928117af0e404edf71085d'
            '8e3e0270cd6a8f16cbf0a80398cc51e33eec37d2c06fa3f76224a46b3d5dfec0'
            '94a47fe751596f32d0ee450090dfa6e4bd486ce362c596cd47e05ccf75d1e0d0'
            '656c61a8d66a6e68125893fe74a2c1b196ee03eb25e99ea94f9e175902b48f97'
            '96c8a041ce5910f5dbcf16851bcbaa148f7adb0a54a2e96a78b9a4deb471fd08'
            'fdec1ae32dbe801fa58d968c51f5625399c8cccaa2ea7d0ac71b77d3982b6dc0'
            'b519ca68073a07aa78e086365f7bb8a633b4e8fa290a88a60f9b460794fe8225'
            '6746161f510cd3e1039e3be85f3ffe2528864749c892534dcab9522494ae4d01'
            '6128e95f6592a7ee04fc0f1a1f1b7150b685254c151394cb059322854a14c75e'
            'f87e1fca2637d549da0d3df8ad48d8779a50e1fb8e60ff33d2a8a0e3292f9bc3'
            'bae1018cd21c110829477a30056f4db57405f3e5e7d1d6a99de299a121fd53ff'
            '613b1a3754b8f2ba811187798168c08371ff357c13f8ff9c83f77519d82f8e3c'
            'ad7fe93ccef46a7913014b0724c9eb065ff7868307a3fd6853f5f55268b1b5d4'
            '84e72c91b90c47b5fbe68d50b44fc26942819c196cd6db57d830f4470d9d5cff'
            '7bbec965ddb15f2fa2ea244652105848a21fb196ab7d72e0ce9b0a2339cea311'
            'bd22e297a147fb917a8228d044e432c6211a3cc98996bd75a48ce8f86863fcf3'
            '576022f5dace54a819162098f80bb027456a0d1971acd84a0a23d572fb12edc5'
            '6acafbf32af8a3e73e04530f1c8354f4ee9a85f297b20005bccc2f8d93b9b77d'
            '9920d67b3c12cbadcaf7dccece579a7e85009ed20e22d47986b3118053d95ee1'
            'bda25fbe88f91081547e242575de76b4d0c631f806dbf30ec3100b5c6a779bae'
            'c9a30587c4b3684541b22fa389429d650c79c605681a69174b3132995646e42b'
            'c6ba726e650f1c194c794956b27a8864b97b784baf01a71938bc7486be13c663'
            'e0463797d667c149f9ac635042ff277b5b5779ef954253c4417b64e46443495c'
            '490380e470868111a712fa311cd0337330ca97a11b69ae54d757c09e5925917e'
            'ed8417edc0126dbf77524586b39977e3ce9dcbd17a59d07e42bb41b90cc20ccf'
            '45dfe05bda47e6a44e3aaf4d5837115eeec72c29c511d875fd48f557698019e6'
            '6ea3e8866e45c4be7956c001ff399278714b83f41267cec430144826e01ebc61'
            '5d460507cc0ae25ba64f1d86b5fc0c0fec6b71f410141fe8b715fb9db0fe2e28'
            '89e534141e12724f4f9ea6d17750a139b6966d282ac916781d8b9ea17dc02975'
            '0977008ca1ae97bdb3c38cadaa79c7938df3855a70bc2714f2ced0d62534cec0'
            '1415b553635b06bc318cb5704fb9f07559ee7c7aaad14d9a9401cae10a173808'
            'fee3e5d715209c1f12f056c415daab457ae19d8cc9f153295dbde5a68cdee856'
            '068ca9960ef6f329b5777b3addc98dce53ac9d2fc96db5815856595581324eb0'
            '33418a766e78a1a55f162bd4dcb776521e44cc065be648ff7e196821b28aa9c7'
            '811b905469266dda60816fb703e571f5e258a5273bdb0fd2915f3d02dde9a5df'
            '992d2aa50eb46c082261551cdcee1ad79b89fedeb2b29730d3f842176f161d05'
            '2c4750dd6ecf66a39cbaa471cb6fb59311e86bb016384a9f3b5d755fca0ebbaf'
            '4a8a0fd8b4870a17b67d7f06a7ff7ff5d57bcdd79abfca72a22f5192af57eade'
            '908c2aff7c9d7456c7c207cdc7d1d378df3771582e04e764458e0b8c40b6b3e7'
            '432e54bd76a932a5641efc81a617486821a0f54a1d8cdbf4bad5182ecf49b51a')
